home *** CD-ROM | disk | FTP | other *** search
/ Info-Mac 4 / Info_Mac IV CD-ROM (Pacific HiTech Inc.)(August 1994).iso / Development / Information / alt-sources-mac-digest-94-02.tx < prev    next >
Internet Message Format  |  1994-06-09  |  21KB

  1. From: dnebing@andy.bgsu.edu (Dave Nebinger)
  2. Subject: Alt.sources.mac Digest #02-94
  3. Date: Wed, 26 Jan 1994 19:47:35 GMT
  4.  
  5. alt.sources.mac digest #2-94                      1/26/94
  6.  
  7. Today's Contents:
  8.  
  9.   [!] administrivia
  10.  
  11.   [*] antialiasedtext.cpt.hqx
  12.   [*] asyncsysbeep.cpt.hqx
  13.   [*] blazingpixels.cpt.hqx
  14.   [*] logfile.cpt.hqx
  15.   [*] newshuttle.cpt.hqx
  16.   [*] patchlib.cpt.hqx
  17.   [*] popupcdef-1.0b1.cpt.hqx
  18.   [*] speedy-mouse-ii.cpt.hqx
  19.   [*] spline.cpt.hqx
  20.   [*] toxicwaste.cpt.hqx
  21.   [*] wintershell-10d2.cpt.hqx
  22.   
  23.   [#] balloonhelp
  24.   [#] bandpass
  25.   [#] copystr255
  26.   [#] dbllinklist-c
  27.   [#] digitalaudio
  28.   [#] drawgoawaybox
  29.   [#] editinmodeless
  30.   [#] flipnums
  31.   [#] getwindowrect
  32.   [#] gmtime
  33.   [#] growicononly
  34.   [#] growzone
  35.   [#] listdir
  36.   [#] listspclkeys-c
  37.   [#] listspclkeys-p
  38.   [#] lzcompression
  39.   [#] menudraw
  40.   [#] modelessdragger
  41.   [#] mousemoved
  42.   [#] quitallapps
  43.   [#] readlocation
  44.   [#] setdialoghdrs
  45.   [#] videosync
  46.   [#] whendrawbw
  47.   [#] xprammap  
  48.  
  49.   [!] Who's Who List
  50.   
  51.   The alt.sources.mac archive is at ftpbio.bgsu.edu
  52. (129.1.252.66) in the /ftp/pub/alt.sources.mac directory.  
  53. Files listed with an [*] before them are in the main
  54. directory.  Files listed with an [#] in front of them
  55. are in the /ftp/pub/alt.sources.mac/00snippet directory.
  56. Scripts are stored in the /ftp/pub/alt.sources.mac/scripts
  57. directory.
  58.  
  59.   Also stored at the archive site are the FAQs for the
  60. Mac newsgroups in the /ftp/pub directory.  Postings to
  61. comp.sources.mac are archived in the /ftp/pub/comp.sources.mac
  62. directory.  The alt.sources.mac digests are archived in the
  63. /ftp/pub/digests directory.
  64.  
  65.   The alt.sources.mac newsgroup is for the distribution of
  66. sources only.
  67.  
  68. ************************************************************
  69.  
  70. From: dnebing@andy.bgsu.edu (Dave Nebinger)
  71. Subject: Administrivia
  72.  
  73.   Welcome to the alt.sources.mac digest.  Currently, I am
  74. the moderator of the archive.  I thought I would post this
  75. message to show everyone what has been accumulating at the
  76. archive site.
  77.  
  78.   Your contributions are highly recommended and accepted.
  79. If you don't have access to the alt.sources.mac newsgroup,
  80. you can email your contribution to me (dnebing@andy.bgsu.edu)
  81. and I will add it to the archive, or you can upload it to
  82. the /ftp/pub/incoming directory at the archive site.
  83.  
  84.   I would also recommend to those programmers posting
  85. snippets to the comp.sys.mac.* heirarchy to also crosspost
  86. them to the alt.sources.mac group so that I can make sure
  87. that it gets added to the archive.
  88.  
  89.   A new addition to the digest is the Who's Who list found at
  90. the end of the digest.  It contains the list of contributors for
  91. the digest.  It will give you, at a glance, an idea about who
  92. is supporting the alt.sources.mac group.
  93.  
  94.   There has been somewhat of a dispute about the fact that I
  95. have stored the undocumented Layer Manager stuff at the
  96. archive.  Apple's postition is that it is for their internal
  97. use only, and if anyone else uses it their package is guaranteed
  98. to break in the future.  Others disagree with this point of
  99. view and would like the information available.  So I am going
  100. to keep it in the archive, but I have added a strict warning to
  101. the snippet about this.
  102.  
  103.   There are also some new documents at ftpbio.bgsu.edu in
  104. the /ftp/pub directory.  Here you will find the FAQ's for most
  105. of the mac programming groups, as well as the ones for
  106. alt.sources.mac.  Also there is a document describing the
  107. submission policy for the archive which includes directions
  108. for posting to alt.sources.mac.  If anything is missing that
  109. you feel should be there, either email it to me or upload it
  110. to ftpbio.bgsu.edu in /ftp/pub/incoming.
  111.  
  112.   Thanks for you support, and if you have any questions,
  113. problems, or maladjustments, feel free to email me.  Also, let
  114. me know if you have any problems accessing the archive.  One
  115. user has already alerted me to an access problem that they were
  116. having.  The only way I can fix things is if I am told...
  117.  
  118.   Dave Nebinger (dnebing@andy.bgsu.edu)
  119.   
  120. ************************************************************
  121. From: Ed Wynne <arwyn@engin.umich.edu>
  122. Subject: Anti-Aliased Text
  123.  
  124. Included is a binhex 4.0 stuffit archive of Think C source
  125. code and a library to draw anti-aliased text with a small
  126. demo app.  I wrote it in the space of an afternoon so it isn't
  127. extremely robust, or probably even bug-free.  Itseems to work
  128. very well on a Centris650 and a IIsi...although, its a little 
  129. slower on the IIsi!
  130.  
  131. Currently this code has one function that mimics DrawString
  132. in every way, except it will only work with black text on a
  133. white background.  At some point I plan on adding forecolor
  134. and backcolor support and I'll repost it then if theirs any
  135. interest.
  136.  
  137. If anybody uses this code (its free...no restrictions
  138. what-so-ever!) all I ask is that you tell me of any bugs you
  139. find (so I can fix them!) or you send me a copy of your fixes.
  140.  
  141. [archived as /ftp/pub/alt.sources.mac/antialiasedtext.cpt.hqx]
  142. ============================================================
  143.  
  144. From: Ed Wynne <arwyn@engin.umich.edu>
  145. Subject: INIT source for asyncronous SysBeep
  146.  
  147. Enclosed is the source (Think C 6.0) and the compiled init that
  148. will make the System Beep totally asyncronous.  This init only
  149. takes about 650 bytes of system heap space and doesn't keep
  150. snd's loaded or sound channels continuously allocated.
  151.  
  152. It might have some compatibility problems on older macs (I don't
  153. do all of the hw config checks that apple does to get the SysBeep
  154. ID from PRAM) but it works OK on a Centris 650.  If you find a 
  155. bug, or a problem with it let me know and I'll fix it.  Or if you
  156. find a bug and decide to fix it yourself, if it isn't too much
  157. trouble please pass this info back onto me.  (I'm running it too!)
  158.  
  159. [archived as /ftp/pub/alt.sources.mac/asyncsysbeep.cpt.hqx]
  160. ============================================================
  161.  
  162. From: kenlong@netcom.com (Ken Long)
  163. Subject: BlazingPixels (descr)
  164.  
  165. Blazing Pixels is a little bit map sprite demo, written by Jay Riley, 
  166. former moderator of the BMUG Programmer's Conference.  On launch, it 
  167. implements one routine: main ().
  168.  
  169. What it does in put up a window, fill it with gray, and move the System 
  170. 'ICN#' (ID 3) around according to mouse location.  The unique thing (I 
  171. though, and what do I know?) is that it uses the absolute minimum code to 
  172. do this.  Also has a VBL synch block of code.
  173.  
  174. I split this main () routine up into 16 subroutines in a modified 
  175. version, included, that uses a resource for the 'ICN#' ID 128, for the 
  176. fun of it.  The icon is my mug.
  177.  
  178. [archived as /ftp/pub/alt.sources.mac/blazingpixels.cpt.hqx]
  179. ============================================================
  180.  
  181. From: dnebing@andy.bgsu.edu (Dave Nebinger)
  182. Subject: Log file routines
  183.  
  184. Here's a nice little, tiny, documented chunk of code for handling
  185. the creation and use of log files in your project.  It works great
  186. for those hard to debug items like bg-apps, inits, etc.
  187.  
  188. Written in Think C 6.01, requires use of FindFolder and the
  189. (at least) ansi-small library.
  190.  
  191. [archived as /ftp/pub/alt.sources.mac/logfile.cpt.hqx]
  192. ============================================================
  193.  
  194. From: kenlong@netcom.com (Ken Long)
  195. Subject: NewShuttle 1.0d3 description
  196.  
  197. NewShuttle is a C port (from Pascal) I did of "Eddy's Shuttle Viewer" - a 
  198. point plotter that draws a wire frame space shuttle with 129 "MoveTo and 
  199. LineTo" calls, according to specified and calculated (on the fly) values.
  200. Then the whole thing is erased and a new, rotated-slightly view is drawn.
  201. This goes on until mouseDown at the end of a cycle. (press and hold down.)
  202.  
  203. NewShuttle 1.0d3 is a further tweak of that same C port (posted on SUMEX 
  204. in "three-point-plotters-c").  This one draws in the whole 512x384 
  205. window, after hiding the menu bar.  I also have a duplicate draw routine, 
  206. that runs first, which takes the calculated MoveTo/LineTo coordinates, 
  207. "nums them to strings," then lists those in 7 columns on the screen.  
  208. THEN it draws the shuttle over them (in yellow if you have color).
  209.  
  210. Future fiddling will output the point coord's to a text file (just for 
  211. the fun of it) and user options to draw them or not.  Also a 
  212. screenBits.bounds calc. into the value math to do the full screen draw in 
  213. proportion on any monitor (I hate the 12" RGB anyway).  Looks funky with 
  214. a 512x384 plain window in the upper left of a 21" RGB with the menu bar 
  215. gone!  And a little, dinky line drawing in it!
  216.  
  217. In the meantime, here's this.  Just a toy, but it's C source!
  218.  
  219. [archived as /ftp/pub/alt.sources.mac/newshuttle.cpt.hqx]
  220. ============================================================
  221.  
  222. From: ari@world.std.com (Ari I Halberstadt)
  223. Subject: Re: [Q] How does one patch the trap _FrontWindow?
  224.  
  225. Following is some THINK C assembly glue which I use in all my trap
  226. patches. It uses some assembly language tricks, but I've used it to
  227. successfully patch HiliteWindow, ExitToShell, and LoadSeg. It allows
  228. the patch routine to skip execution of the original routine and to
  229. return a value as the value of the patch.  Actually, the skip flag has
  230. been tested, but the BlockMove instruction for copying the return
  231. result hasn't been tested since I just haven't had occasion to patch a
  232. routine that returns a value. The patch glue allows only head patches.
  233.  
  234. You could easily modify the glue to work from an INIT by changing the
  235. call to NewPtrClear to NewPtrSysClear, though the merits of creating
  236. pointers in the system heap are debatable. Perhaps you could make it a
  237. relocatable block with the first few instructions after saving the
  238. registers being a call to HGetState/HLock, and just before the last
  239. instruction call HSetState (use HSetState, not HUnlock, so your code
  240. is reentrant).
  241.  
  242. [archived as /ftp/pub/alt.sources.mac/patchlib.cpt.hqx]
  243. ============================================================
  244.  
  245. From: ari@world.std.com (Ari I Halberstadt)
  246. Subject: Type-in Popup CDEF
  247.  
  248. This popup CDEF is compatible with systems 6.0 and 7.0 and is similar
  249. to the standard popup CDEF supplied with system 7.0 and described in
  250. IM-VI. An additional variation code, popupTypeIn, helps support
  251. type-in popup menus by displaying only the down arrow without the
  252. current selection or title. The application still needs to support
  253. the editable text field for the type-in popup menu. Except for the
  254. popupTypeIn attribute this CDEF should be upwards compatible with
  255. the system 7.0 CDEF. The MDEF is used to draw the current selection,
  256. so that even icons in menus are properly displayed. The only major
  257. feature missing is color support, but this should not be difficult
  258. for someone to add. Full C source for THINK C 5.0.4 is included.
  259.  
  260. This software is freeware and may be included in the info-mac
  261. commercial CD-ROM. For all other commercial distribution please
  262. contact the author.
  263.  
  264. [archived as /ftp/pub/alt.sources.mac/popupcdef-1.0b1.cpt.hqx]
  265. ============================================================
  266.  
  267. From: f8dy@access.netaxs.com (Mark Pilgrim)
  268. Subject: Speedy Mouse ][ (INIT, THINK C) 0 of 1
  269.  
  270. Language: THINK C (5/6)
  271. Type: INIT
  272.  
  273. Speedy Mouse ][ will make your mouse move about twice as fast as normal,
  274. unless the caps lock is down, in which case it will be back to normal
  275. speed.
  276. After many users complaining that Speedy Mouse didn't work on their system,
  277. or it did work but conflicted with several other software packages, I have
  278. completely reworked this to come up with a sequel which, like all sequels,
  279. solves all the problems of the original but probably creates new problems
  280. in the process.
  281.  
  282. This INIT installs a vbl (a relatively easy task) and initializes a memory
  283. space before the vbl pointer so that the vbl itself can access it (a
  284. relatively easy task if you know what you're doing, which I didn't when I
  285. started).  The vbl itself finds the current 'mcky' resource in the system
  286. heap (quite a difficult task) and mucks with it, and monitors the low-mem
  287. copy of parameter RAM to notice when the mouse scaling setting has been
  288. changed (an easy but undocumented task) and re-mucks with the 'mcky' data.
  289. The upshot of it is that this INIT never touches the low-memory globals
  290. that
  291. control the actual mouse position, so it shouldn't conflict with any other
  292. software that does (like Snap-To, Quickeys, and voice navigation software).
  293. OTOH, it may have some new problems that I'm not aware of.  In any event,
  294. I heartily don't recommend any of the methods I use in here; to quote an
  295. Apple guru on csmp, "We've reserved a special place in hell for you for
  296. even
  297. THINKING about using any of this information."
  298.  
  299. [archived as /ftp/pub/alt.sources.mac/speedy-mouse-ii.cpt.hqx]
  300. ============================================================
  301.  
  302. From: foster@gaul.csd.uwo.ca (COLIN FOSTER)
  303. Subject: Spline Project 0/2
  304.  
  305. Contained in the archive are source files, Think C project, 
  306. and program for a Graphics program using Splines, prepared by
  307. Reid Ellis.  It's not exactly what was requested, but it 
  308. might be useful.
  309.  
  310.  
  311. -Colin Foster.
  312.  
  313. Colin_Foster@magic-bbs.corp.apple.com
  314.  
  315. [archived as /ftp/pub/alt.sources.mac/spline.cpt.hqx]
  316. ============================================================
  317.  
  318. From: David_K._Peck@digntn1.csgi.com
  319. Subject: Network Message CODE
  320.  
  321. Since so many people requested it, here is a copy of Toxic Waste, my
  322. network
  323. practical joke program. It also contains a copy of the code, which should
  324. be a
  325. very good example of how to send data over a Macintosh network. I hope you
  326. enjoy
  327. it!
  328.  
  329. I am a bit worried that the file is too big to send from the machine I am
  330. using; in that case, it will cut it off... and it won't work. Please tell
  331. me
  332. if it doesn't and I'll send it in smaller segments. The file name is
  333. TW.CPT,
  334. and it is 51k in size.
  335.  
  336. Send any questions, comments, or bugs to:
  337. David Peck
  338. PeckSoftware@his.com
  339.  
  340. [archived as /ftp/pub/alt.sources.mac/toxicwaste.cpt.hqx]
  341. ============================================================
  342.  
  343. From: ari@world.std.com (Ari I Halberstadt)
  344. Subject: winter-shell-10d2-c.cpt.hqx, part 01/20
  345.  
  346. Source code for a Macintosh application shell. Approximately 1.1
  347. megabytes of C source code are provided (at 27 characters per line,
  348. that's over 40000 lines). Both systems 6 and 7 are supported.  You may
  349. use this as the basis for an application, or you may extract any
  350. useful functions you find for use in your own code. There are many
  351. useful code snippets in here, and the code should prove useful for
  352. both beginner and experienced Macintosh programmers. The code was
  353. written with THINK C 5.0.4, though porting to MPW should not be too
  354. difficult; guidelines for porting are included in the file "Porting".
  355. The software is free, and may be used in any free product according to
  356. the terms described in the file "Distribution". For commercial use
  357. please contact the author.
  358.  
  359. This is the first public release. Documentation is sparse; if there is
  360. interest and as time permits I may write additional documentation.
  361.  
  362.  
  363. [archived as /ftp/pub/alt.sources.mac/wintershell-10d2.cpt.hqx]
  364.  
  365. ************************************************************
  366.  
  367. balloonhelp     Perl and Rez scripts for doing Balloon Help
  368.   Peter Lewis (peter@ncrpda.curtin.edu.au)
  369.   Perl and Rez scripts for creating balloon help.
  370.  
  371. bandpass        Band-pass filter
  372.   Rick Walker (walker@opus.hpl.hp.com)
  373.   C source for a band-pass filter [converts sounds between
  374.   frequencies]
  375.  
  376. copystr255      Copying a Str255
  377.   Keith Rollin (keith@taligent.com)
  378.   Demonstrating a quick way in C to copy a Str255 variable.
  379.  
  380. dbllinklist-c   Doubly Linked List Code in C
  381.   Mike Russel (mgr@aggroup.aggroup.com)
  382.   C code that implements a doubly linked list.
  383.  
  384. digitalaudio    Reading digital audio with a CD300
  385.   Theo Vosse (vosse@ruls41.leidenuniv.nl)
  386.   C routines to read sound tracks from a CD300 and play em.
  387.  
  388. drawgoawaybox   Routine for drawing the go away box
  389.   Carl R. Osterwald (carl_osterwald@nrel.gov)
  390.   C function for drawing a go away box.
  391.  
  392. editinmodeless  Implementing edit functions in a modeless dlg
  393.   Andrew McClure (andrew@cs.uwa.oz.au)
  394.   C function for implementing the standard edit functions in a
  395.   modeless dialog.
  396.  
  397. flipnums        Flip between little and big endians
  398.   Ron Hunsinger (ron_hunsinger@bmug.org)
  399.   C functions to flip the byte orders of shorts and longs.
  400.  
  401. getwindowrect   Getting a window's rectangle
  402.   Robert Mah (rmah@panix.com)
  403.   C function to get a window's rectangle.  This rect can then
  404.   be saved and used to reposition and resize a window.
  405.  
  406. gmtime          Getting the time zone of the mac.
  407.   Richard Knuckey (richard@purplex.nacjack.gen.nz)
  408.   C routine to implement gmtime (of un*x fame) on the mac.
  409.  
  410. growicononly    Drawing the Grow Icon without the empty scroll bars
  411.   Frank Manshade (frankm@and.nl)
  412.   C function for drawing the grow icon for a window without also
  413.   drawing the empty scroll bars.
  414.  
  415. growzone        Growing the app's zone
  416.   Peter Lewis (peter@ncrpda.curtin.edu.au)
  417.   Pascal routines for modifying the size of the application's
  418.   zone.
  419.  
  420. listdir         List a volume or directory textually
  421.   Jon Wtte (d88-jwa@hemul.nada.kth.se)
  422.   C routines to list the contents of a volume/directory.
  423.   [Sorry for not being able to get your name right, Jon - Dave]
  424.  
  425. listspclkeys-c  Implementing special keys with a list
  426.   Peter Kocourek (qsi@nu91.wlink.nl)
  427.   C routines to implement the use of special keys (i.e. page
  428.   up and down) with a list.
  429.  
  430. listspclkeys-p  Implementing special keys with a list
  431.   Peter Lewis (peter@ncrpda.curtin.edu.au)
  432.   Pascal routines to implement the use of special keys (i.e. page
  433.   up and down) with a list.
  434.  
  435. lzcompression   lz compression source
  436.   Derek Kwan (dkwan@zeus.uwaterloo.ca)
  437.   C routines to implement lzss, lz-huffman, and lz-ari code.
  438.  
  439. menudraw        Drawing on the right side of the menu
  440.   Keith Rollin (keith@taligent.com)
  441.   C routines for drawing the time on the right side of the menu.
  442.  
  443. modelessdragger FilterProc for SFPGetFile
  444.   Andrew McClure (andrew@cs.uwa.oz.au)
  445.   C FilterProc routine for SFPGetFile that allows dragging
  446.   of windows behind the SFPGetFile window.
  447.  
  448. mousemoved      Getting the location of the mouse pointer
  449.   Ken Long (kenlong@netcom.com)
  450.   C routine to get the location of the mouse and convert it to
  451.   a string which can be printed.
  452.  
  453. quitallapps     How to quit all apps...
  454.   Andrew Francke (afrancke@netcom.com)
  455.   C functions showing how to restart a mac after a given time
  456.   period has elapsed.
  457.  
  458. readlocation    ReadLocation details
  459.   Pete Resnick (resnick@cogsci.uiuc.edu)
  460.   Undocumented details for using ReadLocation.
  461.  
  462. setdialoghdrs   C glue for SetDialogXxx routines
  463.   Benjamin Herrenschmidt (benh@tatooine.fdn.org)
  464.   C glue for the GetStdFilterProc, SetDialogDefaultItem,
  465.   SetDialogCancelItem, SetDialogTracksCursor, and
  466.   StdFilterProc.
  467.  
  468. videosync       Routines for synchronized drawing
  469.   Timothy Hunt (hunt@husc7.harvard.edu)
  470.   C routines for synchronized VBLTask drawing.
  471.  
  472. whendrawbw      When to draw in color vs. b&w
  473.   Carl R. Osterwald (carl_osterwald@nrel.gov)
  474.   Algorithm for deciding when to draw in color vs. b&w.
  475.  
  476. xprammap        Map of the extended pram
  477.   Kiselyov Oleg (oleg@ponder.csci.unt.edu)
  478.   A detailed map of the contents of the XPRAM.
  479.  
  480. ************************************************************
  481.  
  482. Who's Who in Digest #2...
  483.  
  484. The contributors to this digest are:
  485.  
  486.   Colin Foster (foster@gaul.csd.uwo.ca)
  487.   Andrew Francke (afrancke@netcom.com)
  488.   Ari I Halberstadt (ari@world.std.com)
  489.   Benjamin Herrenschmidt (benh@tatooine.fdn.org)
  490.   Ron Hunsinger (ron_hunsinger@bmug.org)
  491.   Timothy Hunt (hunt@husc7.harvard.edu)
  492.   Richard Knuckey (richard@purplex.nacjack.gen.nz)
  493.   Peter Kocourek (qsi@nu91.wlink.nl)
  494.   Derek Kwan (dkwan@zeus.uwaterloo.ca)
  495.   Peter Lewis (peter@ncrpda.curtin.edu.au)
  496.   Ken Long (kenlong@netcom.com)
  497.   Robert Mah (rmah@panix.com)
  498.   Frank Manshade (frankm@and.nl)
  499.   Andrew McClure (andrew@cs.uwa.oz.au)
  500.   Dave Nebinger (dnebing@andy.bgsu.edu)
  501.   Kiselyov Oleg (oleg@ponder.csci.unt.edu)
  502.   Carl R. Osterwald (carl_osterwald@nrel.gov)
  503.   David Peck (David_K._Peck@digntn1.csgi.com)
  504.   Mark Pilgrim (f8dy@access.netaxs.com)
  505.   Pete Resnick (resnick@cogsci.uiuc.edu)
  506.   Keith Rollin (keith@taligent.com)
  507.   Mike Russel (mgr@aggroup.aggroup.com)
  508.   Theo Vosse (vosse@ruls41.leidenuniv.nl)
  509.   Rick Walker (walker@opus.hpl.hp.com)
  510.   Jon Wtte (d88-jwa@hemul.nada.kth.se)
  511.   Ed Wynne (arwyn@engin.umich.edu)
  512.  
  513. ============================================================
  514. Dave Nebinger                    dnebing@andy.bgsu.edu
  515. Network Manager, Biology Dept.   dnebing@opie.bgsu.edu
  516. Bowling Green State University   dnebing@bgsuopie (bitnet)
  517. Bowling Green, OH 43403          #include <std_disclaimer.h>
  518.  
  519.              *THE* alt.sources.mac supporter!
  520.  
  521.  
  522.